<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>{$title}</title>
        <meta name="keywords" content=" {$title}"/>
        <meta name="description" content="{$tuijian}"/>
        <script src="__ROOT__/Public/md5.js" type="text/javascript"></script>
        <style>
            .haodian_title{display:none;}

        </style>
         <include file="Index:header" />
         <div class="haodian_title main" id="haodian">
            <span>商品详情</span>
            <a href="__ROOT__">错误反馈</a>
        </div>
        <div class="shop_main main">
            
        <div class="shop_main_left">
            <img src="{$img}" class="shop_main_img"/>
        </div>
            
        
        <div class="shop_main_right">
           
            
            <h1>
                {$title}
            </h1>
            <p>
                {$tuijian}
            </p>
            <div class="shop_main_right_price">
                <span>优惠券
                    {$qprice}元
                </span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    券后优惠价：
                <span class="new_price">
                     {$now_price}
                </span>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;在售价：<del class="old_price">
                    {$old_price}
                </del>
            </div>
            
            <div class="shop_main_quan">
                <span class="shop_main_sell">
                 已售：       {$sell}
            </span>
                <a href="{$quan}" target="_blank" class="shop_main_quan_url">领券购买</a>
                 <a href="javascript:kouling1()" target="_blank" class="shop_main_kouling">淘口令</a>
                 <a href="https://item.taobao.com/item.htm?id={$goodid}&pid=mm_110473821_19102135_67178552&src=abadboy.cn&dx=1" class="goodurl" target="_blank"  >
                     券已领完，查看商品
                 </a>
                <div class="clear"></div>
            </div>
            
        </div>

        <div class="clear"></div>
        </div>
        
        
        <div class="shop_main main">
            <img class="shop_main_zhibao" src="//img.alicdn.com/tfs/TB1I8svRXXXXXcUXpXXXXXXXXXX-990-100.jpg"/>
        </div>
        
        
        <div class="shop_main main">
            <h3>图文详情</h3>
            <div class="xiangqing">
                <a href="javascript:xiangqing()">点击加载宝贝详情</a>
            </div>
        </div>
        <div class="shop_main main">
            <h3>商品推荐</h3>
            <div class="tuijian">
                ..
            </div>
        </div>
        <div id="kouling">
            <h3>第1步：复制下文淘口令</h3>
            <div class="kouling1"></div>
            <h3>第2步：打开手机淘宝</h3>
            <img src="__ROOT__/Public/img/QQ%E6%88%AA%E5%9B%BE20171001151836.png"/>
            <br/>
            <a href="javascript:koulingdiv_hide()">关闭</a>
        </div>
        <script>
        is_weixin()
            var ispc=IsPC();
            $(document).ready(function(){
                console.log("---------------前端还要写代码？复制粘贴就是干----------");
            
                if(ispc){
                                   
                }else{
                     console.log("---------------这里是手机----------");
                    $(".h_nav").html("<ul><li><a href='#' onclick='javscript:menuIn()'></a></li></ul>")
                }
                if("{$qprice}"==""){
                    //alert("活动已结束")
                    $(".shop_main_quan_url").css("display","none")
                    $(".shop_main_kouling").css("display","none")
                     $(".goodurl").css("display","block")
                }
                
            });
            function is_weixin(){
                var ua = navigator.userAgent.toLowerCase();
                //alert(ua)
                if(ua.match(/MicroMessenger/i)=="micromessenger") {
                    console.log("---------------weixin browser----------");
                    kouling_show()
                    return "weixin";
                }else if(ua.match(/mqqbrowser/i)=="mqqbrowser"){
                    console.log("---------------qq browser----------");
                    kouling_show()
                    return "qq";
                }else {
                    console.log("---------------other browser----------");
                    return "other";
                }
            }
            
            var imgs=true
            function xiangqing(){
                if(imgs){
                    setTimeout(function(){
                        $.ajax({
                            type: "get",
                            async: false,
                            url: 'http://hws.m.taobao.com/cache/mtop.wdetail.getItemDescx/4.1/?&data={"item_num_id":"<php>echo $goodid</php>"}&type=jsonp',
                            dataType: "jsonp",
                            jsonp: "callback",
                            jsonpCallback:"showTuwen",
                            success: function(jsonp){
                                $('.xiangqing').html("")
                                if(jsonp.data.images.length>0){
                                    for(var i = 0 ; i < jsonp.data.images.length ; i++){
                                        $('.xiangqing').append('<img src="'+jsonp.data.images[i]+'" style="width:100%"/>');
                                    }
                                }
            
                                isLoad = true;
                            },
                            error: function(){
                            }
                        });
                    },300);
                    imgs=false
                }else{
                    console.log("---------------已经加载过啦啦啦----------");
                }
                
            }
            var kouling=true
            function kouling1(){
                if(kouling){
                    var timestamp = Date.parse(new Date()); 
                    md5=hex_md5(timestamp/1000)
                    setTimeout(function(){
                        $.post("__ROOT__/Index/kouling",
                          {
                            md5:md5,
                            title:"{$title}",
                            pic:"{$img}",
                            url:"{$quan}"
                          },
                          function(data,status){
                              koulingdiv_show()
                             $(".kouling1").html("长按复制淘口令："+data+"</br> 商品名称：{$title} </br> {$tuijian}")
                            console.log("长按复制淘口令："+data+"\n 商品名称：{$title} \n {$tuijian}");
                          });
                    },300);
                    kouling=false
                }else{
                     koulingdiv_show()
                    $(".kouling1").html("长按复制淘口令："+data+"</br> 商品名称：{$title} </br> {$tuijian}")
                    console.log("---------------已经加载过啦啦啦----------");
                }

            }
            function kouling_show(){
                $(".shop_main_quan_url").css("display","none")
                $(".shop_main_kouling").css("display","block")
            }
            function koulingdiv_show(){
                $("#kouling").css("display","block")
            }
            function koulingdiv_hide(){
                $("#kouling").css("display","none")
            }
         </script>
         <include file="Index:footer" />
